[IA64] in_tpa is now an argument of vcpu_translate
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 9 Mar 2006 23:24:31 +0000 (16:24 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 9 Mar 2006 23:24:31 +0000 (16:24 -0700)
this makes in_tpa SMP-safe.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/xen/process.c
xen/arch/ia64/xen/vcpu.c
xen/include/asm-ia64/vcpu.h

index e7846154e48d604e84c5f868db1d57030ccc8591..e5126c34a54286822bc6c66e8824a925d1f23226 100644 (file)
@@ -280,7 +280,7 @@ void ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_reg
                return;
        }
 
-       fault = vcpu_translate(current,address,is_data,&pteval,&itir,&iha);
+       fault = vcpu_translate(current,address,is_data,0,&pteval,&itir,&iha);
        if (fault == IA64_NO_FAULT) {
                pteval = translate_domain_pte(pteval,address,itir);
                vcpu_itc_no_srlz(current,is_data?2:1,address,pteval,-1UL,(itir>>2)&0x3f);
index 3355a638c3e778bfef50c2f4439394bf9ea6aa4a..a5b58f3f688bc637084defadc93b01571d6524e4 100644 (file)
@@ -6,12 +6,6 @@
  *
  */
 
-#if 1
-// TEMPORARY PATCH for match_dtlb uses this, can be removed later
-// FIXME SMP
-int in_tpa = 0;
-#endif
-
 #include <linux/sched.h>
 #include <public/arch-ia64.h>
 #include <asm/ia64_int.h>
@@ -1290,7 +1284,7 @@ unsigned long recover_to_break_fault_count = 0;
 
 int warn_region0_address = 0; // FIXME later: tie to a boot parameter?
 
-IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pteval, UINT64 *itir, UINT64 *iha)
+IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, BOOLEAN in_tpa, UINT64 *pteval, UINT64 *itir, UINT64 *iha)
 {
        unsigned long region = address >> 61;
        unsigned long pta, pte, rid, rr;
@@ -1402,9 +1396,7 @@ IA64FAULT vcpu_tpa(VCPU *vcpu, UINT64 vadr, UINT64 *padr)
        UINT64 pteval, itir, mask, iha;
        IA64FAULT fault;
 
-       in_tpa = 1;
-       fault = vcpu_translate(vcpu, vadr, 1, &pteval, &itir, &iha);
-       in_tpa = 0;
+       fault = vcpu_translate(vcpu, vadr, TRUE, TRUE, &pteval, &itir, &iha);
        if (fault == IA64_NO_FAULT)
        {
                mask = itir_mask(itir);
index dd2eb85a897c2d2ca1bc7d405e5fb6fe26c1b648..42e3817d740f8ad4aa7b11330eba5b348c5ffd94 100644 (file)
@@ -140,7 +140,9 @@ extern IA64FAULT vcpu_ptc_g(VCPU *vcpu, UINT64 vadr, UINT64 addr_range);
 extern IA64FAULT vcpu_ptc_ga(VCPU *vcpu, UINT64 vadr, UINT64 addr_range);
 extern IA64FAULT vcpu_ptr_d(VCPU *vcpu,UINT64 vadr, UINT64 addr_range);
 extern IA64FAULT vcpu_ptr_i(VCPU *vcpu,UINT64 vadr, UINT64 addr_range);
-extern IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pteval, UINT64 *itir, UINT64 *iha);
+extern IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address,
+                               BOOLEAN is_data, BOOLEAN in_tpa,
+                               UINT64 *pteval, UINT64 *itir, UINT64 *iha);
 extern IA64FAULT vcpu_tpa(VCPU *vcpu, UINT64 vadr, UINT64 *padr);
 extern IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa);
 extern IA64FAULT vcpu_fc(VCPU *vcpu, UINT64 vadr);